﻿using System;

using NUnit.Framework;
using Spring.Testing.NUnit;

using VisualAgile.Model;
using VisualAgile.IDAL;

namespace VisualAgile.DAL.Tests
{
    [TestFixture]
    public class FeelingsDaoTest : AbstractTransactionalDbProviderSpringContextTests
    {
        protected override string[] ConfigLocations
        {
            get
            {
                return new String[] { "objects.xml" };
            }
        }

        protected IFeelingsDao FeelingsDao
        {
            get
            {
                return applicationContext.GetObject("FeelingsDao") as IFeelingsDao;
            }
        }

        [Test]
        public void SaveFeelingsTest()
        {
            Feelings feeling = new Feelings();            
            
            feeling.CreateTime = DateTime.Now;
            feeling.Date = DateTime.Now;
            feeling.Feeling = "Good";            

            FeelingsDao.Save(feeling);
            transactionManager.Commit(transactionStatus);
        }       
    }
}
